package com.gregbugaj.nscaffold.generator;

import java.io.File;

/**
 * Contains information related to current generation context;
 * <ul>
 * <li>Handle to code generator to use</li>
 * <li>Handle to class naming strategy</li>
 * </ul>
 * @author gbugaj
 *
 */
public class GenerationContext {
	private File generationWebcontentFolder;
	private File generationOutputPackageFolder;
	private File generationConfigFolder;
	
	//Location where extension classes reside
	private String entensisonPackageName;
	private String outputPackageName;
	public void setGenerationWebcontentFolder(File generationFolder) {
		this.generationWebcontentFolder=generationFolder;
	}

	public File getGenerationWebcontentFolder() {
		return generationWebcontentFolder;
	}

	public String getEntensisonPackageName() {
		return entensisonPackageName;
	}

	public void setEntensisonPackageName(String entensisonPackageName) {
		this.entensisonPackageName = entensisonPackageName;
	}

	public File getGenerationOutputPackageFolder() {
		return generationOutputPackageFolder;
	}

	public void setGenerationOutputPackageFolder(File generationOutputPackageFolder) {
		this.generationOutputPackageFolder = generationOutputPackageFolder;
	}

	public void setOutputPackageName(String outputPackageName) {
		if(outputPackageName.endsWith(".")){
			throw new IllegalArgumentException("Package name can't end with '.'");
		}
		this.outputPackageName=outputPackageName;		
	}
	public String getOutputPackageName() {
		return outputPackageName;
	}

	public File getGenerationConfigFolder() {
		return generationConfigFolder;
	}

	public void setGenerationConfigFolder(File generationConfigFolder) {
		this.generationConfigFolder = generationConfigFolder;
	}	

}
